-- GENERATED SPELL FOR [Life Spark] --


function spell0_34004(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(64230,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_34004', 561, 1)
end

function spell1_34004(pUnit, Event) --@Static Charged,Self--
pUnit:FullCastSpellOnTarget(64227,pUnit)
pUnit:RegisterEvent('Sorts_34004', 0, 1)
end

function spell2_34004(pUnit, Event) --@Static Charged,Self--
pUnit:FullCastSpellOnTarget(64236,pUnit)
pUnit:RegisterEvent('Sorts_34004', 0, 1)
end

function Sorts_34004(pUnit, Event)
local choix_sorts_34004 = math.random(0, 2)
if choix_sorts_34004 == 0 then
pUnit:RegisterEvent('spell0_34004', 1, 1)
end
if choix_sorts_34004 == 1 then
pUnit:RegisterEvent('spell1_34004', 1, 1)
end
if choix_sorts_34004 == 2 then
pUnit:RegisterEvent('spell2_34004', 1, 1)
end
end

function mob34004_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_34004', math.random(1500, 3000), 1)
end

function mob34004_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34004_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34004_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(34004, 1, 'mob34004_Action')
RegisterUnitEvent(34004, 2, 'mob34004_Leave')
RegisterUnitEvent(34004, 3, 'mob34004_Kill')
RegisterUnitEvent(34004, 4, 'mob34004_Die')
